package cn.stylefeng.guns.modular.business.custom.enums;

import java.math.BigDecimal;

public enum BonusTypeEnum {

    CREATE_ORDER(1, "制单", new BigDecimal("7")),
    ASSIGN_PICK(6, "指派提车", new BigDecimal("6")),
    DELIVERY(5, "交付", new BigDecimal("5")),
    TRANSPORT(4, "发车", new BigDecimal("4")),

    FREE_PICK_CAR(2, "提短", new BigDecimal("6")),
    VERIFY_CAR(3, "验车", new BigDecimal("6")),



    SIGN(7, "签收", new BigDecimal("6")),
    STOCK(8, "入库", new BigDecimal("6"));

    BonusTypeEnum(int type, String desc, BigDecimal amount) {
        this.type = type;
        this.desc = desc;
        this.amount = amount;
    }

    public int type;

    public String desc;

    public BigDecimal amount;

    public static String valid(Integer type) {
        if (type == null) {
            return "";
        }
        BonusTypeEnum[] pts = BonusTypeEnum.values();
        for (BonusTypeEnum pt : pts) {
            if (type == pt.type) {
                return pt.desc;
            }
        }
        return "";
    }
}
